//
//  JHSNetworkTool.h
//  JHSSweep
//
//  Created by YanYaxing on 2017/3/24.
//  Copyright © 2017年 JHDS. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFHTTPSessionManager.h>



@interface JHSNetworkTool : AFHTTPSessionManager

//单例
+ (instancetype)shareManager;



/**
 POST请求
 
 @param urlStr  url字符串
 @param parameters 字典，数组参数
 @param successBK 传输成功 block
 @param failureBK  传输失败 block
 */
- (void)postWithURLStr:(NSString *)urlStr withParameters:(id)parameters withSuccessBlock:(void(^)(id responseBody))successBK withFailureBlock:(void(^)(NSError *error))failureBK;


/**
 GET请求
 
 @param urlStr  url字符串
 @param parameters 字典，数组参数
 @param successBK 传输成功 block
 @param failureBK  传输失败 block
 */
- (void)getWithURLStr:(NSString *)urlStr withParameters:(id)parameters withSuccessBlock:(void(^)(id responseBody))successBK withFailureBlock:(void(^)(NSError *error))failureBK;



- (void) reqeustWith: (NSString *)url
              method: (NSString *)method
          parameters: (NSDictionary *) parameters
            callBack: (void(^)(id response)) callBack;





@end
